    <?php  include VIEWPATH.'common/head.php';  ?>
    <link href="<?php echo FONT_PATH.'static/bootstrap';?>/css/plugins/chosen/chosen.css" rel="stylesheet">
    <style>
        ul.chosen-results li{text-align:left !important;}
    </style>
    <!-- 日期组件 -->
    <link href="<?php echo FONT_PATH.'static/bootstrap/';?>css/bootstrap-datetimepicker.min.css" rel="stylesheet">
    <script src="<?php echo FONT_PATH.'static/bootstrap/';?>js/bootstrap-datetimepicker.js"></script>
    <!-- 日期组件 -->
    <body class="gray-bg">
    <div class="add-btn" style="float:right;margin-bottom:5px;">
        <div class="modal fade" id="img_list" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
            <div class="modal-dialog" style="width: 60%;"><div class="modal-content"></div></div>
        </div>
    </div>
    <div class="add-btn" style="float:right;margin-bottom:5px;">
        <div class="modal fade" id="add_img" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
            <div class="modal-dialog" style="width: 60%;"><div class="modal-content"></div></div>
        </div>
    </div>
    <div class="clearfix"></div>

    <div class="wrapper wrapper-content ">
        <div class="add-btn" style="float:right;margin-bottom:5px;">
            <div class="modal fade" id="order_detail" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
                <div class="modal-dialog" style="width: 80%;"><div class="modal-content"></div></div>
            </div>
        </div>
        <div class="add-btn" style="float:right;margin-bottom:5px;">
            <div class="modal fade" id="order_audit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
                <div class="modal-dialog" style="width: 50%;"><div class="modal-content"></div></div>
            </div>
        </div>
        <script>
            function js_in_array(id,id_arr) {
                for(var i=0;i<id_arr.length;i++){
                    if(id === id_arr[i]){
                        // alert(id);
                        // alert(id_arr[i]);
                        return true;
                    }
                }
                return false;
            }
        </script>
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5><?php echo $pageTitle;?></h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="close-link">
                                <i class="fa fa-times"></i>
                            </a>
                        </div>
                    </div>
                    <?php
//                    $type_arr=array(1=>'审核帖子', 2=>"删除帖子", 3=>"帖子审核不通过", 4=>"删除评论", 5=>"修改评论", 6=>"删除帖子图片", 7=>"删除图片库图片", 8=>"为帖子上传封面图", 9=>"删除管理员", 10=>"开启火眼金精", 11=>"添加管理员", 12=>"编辑用户信息", 13=>"添加白名单", 14=>"移除白名单", 15=>"开启前端审核", 16=>"添加话题", 17=>"修改话题", 18=>"设置话题标签状态", 19=>"添加标签", 20=>"修改标签", 21=>"设置标签状态", 22=>"后台登陆成功",
//                        23=>"后台退出成功",
//                        24=>"评论恢复",
//                        );
                    ?>
                    <div class="ibox-content">
                        <div style="margin-top: 15px;">
                            <form class="form-horizontal" id="f_form" action="index.php?c=<?php echo $_REQUEST['c'];?>&m=<?php echo $_REQUEST['m'];?>" name="form" method="post">
                                <div class="form-group">
                                    <div class="col-sm-1" style="text-align: right;line-height: 30px;padding: 0px;">
                                        选择操作类型：
                                    </div>
                                    <div class="col-sm-2">
                                        <select name="type" class="form-control">
                                            <option value="">全部操作类型</option>
                                            <?php
                                            foreach($type_arr as $k => $d){ ?>
                                                <option value="<?php echo $k;?>"  <?php echo $k == $type ? 'selected' : '';?>><?php echo $d;?></option>
                                            <?php } ?>
                                        </select>
                                    </div>
                                    <div class="col-sm-1" style="text-align: right;line-height: 30px;padding: 0px;">
                                        选择操作人：
                                    </div>
                                    <div class="col-sm-2">
                                        <select name="uid" class="form-control">
                                            <option value="">全部操作人</option>
                                            <?php
                                            foreach($admin_list as $k => $d){ ?>
                                                <option value="<?php echo $d['uid'];?>"  <?php echo $d['uid'] == $uid ? 'selected' : '';?>><?php echo $d['nickname'];?></option>
                                            <?php } ?>
                                        </select>
                                    </div>

                                    <div class="col-sm-1">
                                        <button class="btn btn-sm btn-primary" type="submit"> 搜索 </button>
                                    </div>

                                </div>
                            </form>
                        </div>
                        <div>
                            <!-- Tab panes -->
                            <style>
                                <!--
                                .table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th{vertical-align:top;}
                                -->
                            </style>
                            <div class="tab-content">
                                <div role="tabpanel" class="tab-pane active" id="sellTab1">
                                    <style type="text/css">
                                        .tg  {border-collapse:collapse;border-spacing:0;}
                                        .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;word-break:normal;border-color:black;}
                                        .tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;word-break:normal;border-color:black;}
                                        .tg .tg-us36{vertical-align:middle}
                                    </style>
                                    <table class="tg table table-bordered">
                                        <tr style="background: #c8c8c8;">
                                            <th class="tg-us36" width="45%">
                                                操作描述
                                            </th><th class="tg-us36" width="10%">
                                                关联id
                                            </th>
                                            <th class="tg-us36" width="15%">
                                                操作时间
                                            </th>
                                            <th class="tg-us36" width="15%">
                                                操作人昵称
                                            </th>
                                            <th class="tg-us36" width="15%">
                                                操作人手机号
                                            </th>
                                        </tr>
                                        <?php
                                        if(!empty($list)){
                                            foreach($list as $data){
                                        ?>
                                            <tr>
                                                <td>
                                                    [<?php echo $type_arr[$data['type']];?>]<br>
                                                    <?php echo $data['desc'];?>
                                                </td>
                                                <td><?php echo $data['post_id']?></td>
                                                <td><?php echo date("Y-m-d H:i:s",$data['add_time'])?></td>
                                                <td><?php echo $data['u_nickname']?></td>
                                                <td><?php echo $data['mobile']?></td>
                                            </tr>
                                        <?php }}?>
                                    </table>

                                    <div class="set_page">
                                        <?php
                                            if($status_s!==0){
                                                echo $multipage;
                                            }
                                        ?>
                                        <div class="clearfix"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="<?php echo FONT_PATH.'static/bootstrap';?>/js/plugins/chosen/chosen.jquery.js"></script>
    <script src="<?php echo FONT_PATH.'static/bootstrap';?>/js/demo/form-advanced-demo.min.js"></script>

    <script type="text/javascript">
        $(function () {
            function getDate(num) {
                var t =  24*3600*1000;
                var n = new Date()*1;
                return new Date(n +  num*t).toLocaleDateString().replace(/\//g,'-');
            }
            function setDateRange(type) {
                var $start=$('#use_time1 input');
                var $end=$('#use_time2 input');
                switch(type){
                    case 'dm':
                        $start.val(getDate(-1*(new Date().getDate())+1));
                        $end.val(getDate(0));
                        break;
                    case 'd1':
                        $start.val(getDate(-1));
                        $end.val(getDate(-1));
                        break;
                    case 'd7':
                        $start.val(getDate(-7));
                        $end.val(getDate(0));
                        break;
                    case 'd30':
                        $start.val(getDate(-30));
                        $end.val(getDate(0));
                        break;
                }
            }
            $('#use_time1,#use_time2,#add_time1,#add_time2').datetimepicker({
                language: 'zh-CN',
                minView: "month",
                format:'yyyy-mm-dd',
                initialDate: new Date(),
                autoclose: true,
                todayBtn: true,
            });
            //setDateRange('dm');
            $(".time-range").bind('click',function () {
                setDateRange($(this).data('type'));
            })
        })
    </script>
<?php  include VIEWPATH.'common/footer.php';  ?>